<?php
// +----------------------------------------------------------------------
// | Author: derek <693472824@qq.com> <http://www.bloveambition.com/>
// +----------------------------------------------------------------------

namespace Api\Model;
use Think\Model\ViewModel;

/**
 * 评价模型层
 * derek <693472824@qq.com>
 */
class EvaluationViewModel extends ViewModel {

    protected $viewFields = array(
            
        'WorkerEvaluation'   =>  array(
                            'ev_id', 'order_id', 'score', 'content', 'create_time',
        ),
            
        'User'    =>  array(
                            'username',
                            '_on'=>'WorkerEvaluation.user_id = User.user_id',
                            '_type'=>'LEFT'
        ),
            
        'Attachment'        =>  array(
                            'fullpath',
                            '_on'=>'User.att_id=Attachment.att_id'
        )
    );
}